import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:sports_new/resources/colours.dart';

class AppTheme {
  static ThemeData mainTheme() {
    return ThemeData(
        iconTheme: const IconThemeData(size: 20),
        fontFamilyFallback: const ['PingFang SC'],
        fontFamily: 'PingFang SC', //全局配置默认字体使得中文字重正常渲染
        primaryColor: Colours.main,
        scaffoldBackgroundColor: Colors.white,
        // hintColor: Colours.grey_text_color,
        splashColor: Colors.transparent,
        highlightColor: Colors.transparent,
        textButtonTheme: TextButtonThemeData(style: ButtonStyle(
            overlayColor: MaterialStateProperty.resolveWith((states) {
          return Colors.transparent;
        }))),
        useMaterial3: false,
        appBarTheme: const AppBarTheme(
            centerTitle: true,
            backgroundColor: Colours.white,
            elevation: 0,
            toolbarHeight: 44,
            iconTheme: IconThemeData(size: 20, color: Colours.text),
            titleTextStyle: TextStyle(
              fontSize: 18,
              fontWeight: FontWeight.w500,
              color: Colours.text,
              // fontFamily: "HanSans",
            )),
        cupertinoOverrideTheme: const CupertinoThemeData(
            textTheme: CupertinoTextThemeData(
          // dateTimePickerTextStyle:
          //     TextStyle(color: Colours.grey_color1, fontSize: 16),
          pickerTextStyle: TextStyle(color: Colours.grey66, fontSize: 16),
          // textStyle: TextStyle(color: Colours.red_color, fontSize: 16),
        )),
        buttonTheme: const ButtonThemeData(buttonColor: Colours.main));
  }
}
